]> dgit.raspbian.org Git - gnome-shell.git/commit
st/private: Fix texture leak when creating shadow from actor
authorSebastian Keller <skeller@gnome.org>
Thu, 21 Aug 2025 17:45:21 +0000 (19:45 +0200)
committerSebastian Keller <skeller@gnome.org>
Fri, 29 Aug 2025 09:10:36 +0000 (11:10 +0200)
commit6f9483c434c08e5dbaeec919cddbcb050ab4d2da
treef5cbe23206de28f9b6fb82ede9d29b13f56ae338
parent1c37375d37bb556c85f6aabbc2f8bf70d710216f
st/private: Fix texture leak when creating shadow from actor

cogl_pipeline_set_layer_texture() adds its own ref to the texture in
_cogl_pipeline_set_layer_texture_data() when called via
_st_create_shadow_pipeline(), so the initial reference is leaked when
the pointer is stolen.

Fix this by not stealing the pointer, so autoptr can unref the texture.
Before the code was changed to autoptr in 71accdd97 the texture was also
manually unrefed after calling _st_create_shadow_pipeline().

Fixes: 71accdd97 ("st: Adapt to CoglObject removal")
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8509
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3854>
src/st/st-private.c